#include<iostream>
#include<string>
using namespace std;

string poem[21];

bool is_ong(string s)
{
	int pos = s.find(',');
	string front = s.substr(0, pos);
	if (front.length() < 3)
	{
		return false;
	}
	string y_f = front.substr(front.length() - 3, 3);
	string y_b = s.substr(s.length() - 4, 3);
	if (y_f == "ong" && y_b == "ong")
	{
		return true;
	}
	return false;
}

void to_zhong(string& s)
{
	int back = s.length() - 2;
	int word = 0;
	for (int i = s.length(); i >= 0; i--)
	{
		if (s[i] == ' ')
		{
			word++;
			if (word == 3)
			{
				s.erase(i + 1, back - i);
				s.insert(i + 1, "qiao ben zhong");
				return;
			}
		}
	}
}

void to_skip(string& s)
{
	s = "Skipped";
}

int main()
{
	int n;
	cin >> n;
	cin.get();
	for (int i = 0; i < n; i++)
	{
		getline(cin, poem[i]);
		if (is_ong(poem[i]))
		{
			to_zhong(poem[i]);
		}
		else
		{
			to_skip(poem[i]);
		}
	}
	for (int i = 0; i < n; i++)
	{
		cout << poem[i];
		if (i != n - 1)
		{
			cout << endl;
		}
	}
	return 0;
}